<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>购买VIP_资源共享平台</title>
    <link rel="stylesheet" href="/layui/css/layui.css"/>
    <link rel="stylesheet" href="/css/style.css"/>
</head>
<body>
<div th:include="common/header" class="header-wrapper"></div>
<div class="container-wrapper">
    <div class="data-list">
        <div class="data-list-title">
            <i class="layui-icon layui-icon-rate-solid"></i>
            <span class="head">VIP购买</span>
        </div>
        <div style="padding: 10px;line-height: 40px;">
            购买资源共享平台VIP，即可获取该站VIP会员资格，永久免费下载所有资源，获取VIP资源，进入VIP群，更多福利等着你~<br/>
            在线支付开通VIP（目前VIP价格：100元）开通后请添加管理员QQ：11223344，提供本站用户名，升级为本站VIP会员<br/>
            选择支付方式：
            <input type="radio" name="way" value="1" title="支付宝" checked="checked"/>&nbsp;支付宝&nbsp;&nbsp;
            <input type="radio" name="way" value="2" title="微信"/>&nbsp;微信&nbsp;&nbsp;<br/>
            <button class="layui-btn" onclick="submitPay()">进行支付</button>
        </div>
    </div>
</div>
<div th:include="common/link" class="wrapper"></div>
<div th:include="common/footer" class="footer-wrapper"></div>
<script src="/layui/layui.js"></script>
<script src="/js/common.js"></script>
<script type="text/javascript" th:inline="javascript">
    /*<![CDATA[*/
    let $, layer;
    layui.use(['layer', 'element'], function () {
        $ = layui.jquery,
            layer = layui.layer;
    });

    function submitPay() {
        if ([[${session.currentUser}]] == null) {
            layer.msg('请您先登录！');
            return;
        }

        let way = $('input:radio[name="way"]:checked').val();
        if (way == '1') {
            window.location.href = "/alipay/pay";
        } else if (way == '2') {
            window.location.href = "/wechatPay/pay";
        }
    }
    /*]]>*/
</script>
</body>
</html>